package com.baizhi.service.impl;

import com.baizhi.entity.Record;
import com.baizhi.mapper.RecordMapper;
import com.baizhi.service.IRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author haiyu
 * @since 2021-08-26
 */
@Service
public class RecordServiceImpl extends ServiceImpl<RecordMapper, Record> implements IRecordService {

    @Override
    public PageInfo<Record> selectFy(Integer pageNo , Integer pageSize, String name, String stuName) {
        PageHelper.startPage(pageNo,pageSize);//分页准备的信息信息 开启分期
        List<Record> records = baseMapper.selectCy(name, stuName);
        PageInfo<Record> pi = new PageInfo<>(records);
        return pi;

    }



}
